package demo;

class Node8{
    private static Node8 node8=new Node8();
    private Node8(){

    }
    public static Node8 get(){
        return node8;
    }
}


class Node{
    private static volatile Node node=null;
    private Node(){

    }
    public static Node get(){
        if(node==null){
            synchronized(Node.class){
                if(node==null){
                    node=new Node();
                }
            }
        }
        return node;
    }
}
public class Demo8 {
}
